package com.edu.networkexperimentation.model.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName effect
 */
@TableName(value ="effect")
@Data
public class Effect implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private Long paperid;

    /**
     * 
     */
    private Integer type;

    /**
     * 
     */
    private Integer iterationnum;

    /**
     * 
     */
    private Double fitness;

    /**
     * 
     */
    private Integer questionnum;

    /**
     * 
     */
    private Double difficulty;

    /**
     * 
     */
    private Double knowledgecoverage;

    /**
     * 
     */
    private Date createtime;

    /**
     * 
     */
    private Date updatetime;

    /**
     * 
     */
    private Integer isdelete;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Effect other = (Effect) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPaperid() == null ? other.getPaperid() == null : this.getPaperid().equals(other.getPaperid()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getIterationnum() == null ? other.getIterationnum() == null : this.getIterationnum().equals(other.getIterationnum()))
            && (this.getFitness() == null ? other.getFitness() == null : this.getFitness().equals(other.getFitness()))
            && (this.getQuestionnum() == null ? other.getQuestionnum() == null : this.getQuestionnum().equals(other.getQuestionnum()))
            && (this.getDifficulty() == null ? other.getDifficulty() == null : this.getDifficulty().equals(other.getDifficulty()))
            && (this.getKnowledgecoverage() == null ? other.getKnowledgecoverage() == null : this.getKnowledgecoverage().equals(other.getKnowledgecoverage()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getUpdatetime() == null ? other.getUpdatetime() == null : this.getUpdatetime().equals(other.getUpdatetime()))
            && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPaperid() == null) ? 0 : getPaperid().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getIterationnum() == null) ? 0 : getIterationnum().hashCode());
        result = prime * result + ((getFitness() == null) ? 0 : getFitness().hashCode());
        result = prime * result + ((getQuestionnum() == null) ? 0 : getQuestionnum().hashCode());
        result = prime * result + ((getDifficulty() == null) ? 0 : getDifficulty().hashCode());
        result = prime * result + ((getKnowledgecoverage() == null) ? 0 : getKnowledgecoverage().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getUpdatetime() == null) ? 0 : getUpdatetime().hashCode());
        result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", paperid=").append(paperid);
        sb.append(", type=").append(type);
        sb.append(", iterationnum=").append(iterationnum);
        sb.append(", fitness=").append(fitness);
        sb.append(", questionnum=").append(questionnum);
        sb.append(", difficulty=").append(difficulty);
        sb.append(", knowledgecoverage=").append(knowledgecoverage);
        sb.append(", createtime=").append(createtime);
        sb.append(", updatetime=").append(updatetime);
        sb.append(", isdelete=").append(isdelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}